Spot-On
spot-on.h
1 /*
2 ** Copyright (c) 2011 - 10^10^10, Alexis Megas.
3 ** All rights reserved.
4 **
5 ** Redistribution and use in source and binary forms, with or without
6 ** modification, are permitted provided that the following conditions
7 ** are met:
8 ** 1. Redistributions of source code must retain the above copyright
9 ** notice, this list of conditions and the following disclaimer.
10 ** 2. Redistributions in binary form must reproduce the above copyright
11 ** notice, this list of conditions and the following disclaimer in the
12 ** documentation and/or other materials provided with the distribution.
13 ** 3. The name of the author may not be used to endorse or promote products
14 ** derived from Spot-On without specific prior written permission.
15 **
16 ** SPOT-ON IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 ** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 ** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 ** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 ** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 ** SPOT-ON, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27 
28 #ifndef _spoton_h_
29 #define _spoton_h_
30 
31 #include <QApplication>
32 #include <QCheckBox>
33 #include <QClipboard>
34 #include <QDateTime>
35 #include <QDesktopServices>
36 #include <QDialog>
37 #include <QDir>
38 #include <QElapsedTimer>
39 #include <QFileDialog>
40 #include <QFuture>
41 #include <QFutureWatcher>
42 #include <QHash>
43 #include <QInputDialog>
44 #include <QLocale>
45 #ifdef Q_OS_MAC
46 #if QT_VERSION < 0x050000
47 #include <QMacStyle>
48 #endif
49 #endif
50 #include <QMainWindow>
51 #if QT_VERSION >= 0x050000
52 #include <QMediaPlayer>
53 #endif
54 #include <QMessageBox>
55 #include <QMouseEvent>
56 #ifdef Q_OS_WIN
57 #include <qt_windows.h>
58 #include <QtNetwork>
59 #else
60 #include <QNetworkInterface>
61 #endif
62 #include <QPointer>
63 #include <QProcess>
64 #include <QQueue>
65 #include <QScrollBar>
66 #include <QSet>
67 #include <QSettings>
68 #include <QSqlDatabase>
69 #include <QSqlError>
70 #include <QSqlQuery>
71 #include <QSqlRecord>
72 #include <QSslSocket>
73 #include <QStyle>
74 #include <QTimer>
75 #include <QTranslator>
76 #include <QUuid>
77 #if QT_VERSION >= 0x050600 && defined(SPOTON_WEBENGINE_ENABLED)
78 #include <QWebEngineUrlRequestInterceptor>
79 #endif
80 #include <QtDebug>
81 
82 #include <limits>
83 
84 extern "C"
85 {
86 #include "libSpotOn/libspoton.h"
87 }
88 
89 #ifdef Q_OS_MAC
90 #if QT_VERSION >= 0x050000
91 #include "Common/CocoaInitializer.h"
92 #endif
93 #endif
94 
95 #include "spot-on-buzzpage.h"
96 #include "spot-on-defines.h"
97 #include "ui_spot-on-keyboard.h"
98 
99 class QStandardItemModel;
100 
101 class spoton_virtual_keyboard: public QDialog
102 {
103  Q_OBJECT
104 
105  public:
106  spoton_virtual_keyboard(QWidget *parent):QDialog(parent)
107  {
108  m_ui.setupUi(this);
109  setWindowTitle
110  (tr("%1: Virtual Keyboard").arg(SPOTON_APPLICATION_NAME));
111  m_ui.passphrase->clear();
112  m_ui.passphrase->setEchoMode(QLineEdit::Password);
113  connect(m_ui.back,
114  SIGNAL(clicked(void)),
115  this,
116  SLOT(slotBack(void)));
117  connect(m_ui.shift,
118  SIGNAL(clicked(void)),
119  this,
120  SLOT(slotShift(void)));
121  connect(m_ui.show,
122  SIGNAL(toggled(bool)),
123  this,
124  SLOT(slotShow(bool)));
125 
126  QLocale::Country country = QLocale::system().country();
127  QStringList row;
128 
129  if(country == QLocale::Germany)
130  row << "°\n^"
131  << "!\n1"
132  << "\"\n2"
133  << "§\n3"
134  << "$\n4"
135  << "%\n5"
136  << "&&\n6"
137  << "/\n7"
138  << "(\n8"
139  << ")\n9"
140  << "=\n0"
141  << "?\nß"
142  << "`\n´";
143  else
144  row << "~\n`"
145  << "!\n1"
146  << "@\n2"
147  << "#\n3"
148  << "$\n4"
149  << "%\n5"
150  << "^\n6"
151  << "&&\n7"
152  << "*\n8"
153  << "(\n9"
154  << ")\n0"
155  << "_\n-"
156  << "+\n=";
157 
158  for(int i = 0; i < row.size(); i++)
159  {
160  QToolButton *button = new QToolButton(this);
161 
162  button->setMinimumSize(45, 45);
163  button->setText(row.at(i));
164  m_ui.number_layout->addWidget(button);
165  }
166 
167  row.clear();
168 
169  if(country == QLocale::Germany)
170  row << "q"
171  << "w"
172  << "e"
173  << "r"
174  << "t"
175  << "z"
176  << "u"
177  << "i"
178  << "o"
179  << "p"
180  << "ü"
181  << "*\n+"
182  << "'\n#";
183  else
184  row << "q"
185  << "w"
186  << "e"
187  << "r"
188  << "t"
189  << "y"
190  << "u"
191  << "i"
192  << "o"
193  << "p"
194  << "{\n["
195  << "}\n]"
196  << "|\n\\";
197 
198  for(int i = 0; i < row.size(); i++)
199  {
200  QToolButton *button = new QToolButton(this);
201 
202  button->setMinimumSize(45, 45);
203  button->setText(row.at(i));
204  m_ui.row1->addWidget(button);
205  }
206 
207  row.clear();
208 
209  if(country == QLocale::Germany)
210  row << "a"
211  << "s"
212  << "d"
213  << "f"
214  << "g"
215  << "h"
216  << "j"
217  << "k"
218  << "l"
219  << "ö"
220  << "ä";
221  else
222  row << "a"
223  << "s"
224  << "d"
225  << "f"
226  << "g"
227  << "h"
228  << "j"
229  << "k"
230  << "l"
231  << ":\n;"
232  << "\"\n'";
233 
234  for(int i = 0; i < row.size(); i++)
235  {
236  QToolButton *button = new QToolButton(this);
237 
238  button->setMinimumSize(45, 45);
239  button->setText(row.at(i));
240  m_ui.row2->addWidget(button);
241  }
242 
243  row.clear();
244 
245  if(country == QLocale::Germany)
246  row << "y"
247  << "x"
248  << "c"
249  << "v"
250  << "b"
251  << "n"
252  << "m"
253  << ";\n,"
254  << ":\n."
255  << "_\n-";
256  else
257  row << "z"
258  << "x"
259  << "c"
260  << "v"
261  << "b"
262  << "n"
263  << "m"
264  << "<\n,"
265  << ">\n."
266  << "?\n/";
267 
268  for(int i = 0; i < row.size(); i++)
269  {
270  QToolButton *button = new QToolButton(this);
271 
272  button->setMinimumSize(45, 45);
273  button->setText(row.at(i));
274  m_ui.row3->addWidget(button);
275  }
276 
277  foreach(QToolButton *button, findChildren<QToolButton *> ())
278  if(button != m_ui.back && button != m_ui.shift)
279  connect(button,
280  SIGNAL(clicked(void)),
281  this,
282  SLOT(slotKeyPressed(void)));
283  }
284 
286  {
287  }
288 
289  Ui_spoton_keyboard m_ui;
290 
291  private slots:
292  void slotBack(void)
293  {
294  m_ui.passphrase->backspace();
295  }
296 
297  void slotKeyPressed(void)
298  {
299  QToolButton *button = qobject_cast<QToolButton *> (sender());
300 
301  if(!button)
302  return;
303 
304  QString text(m_ui.passphrase->text());
305 
306  if(button == m_ui.space)
307  text.append(" ");
308  else if(m_ui.shift->isChecked())
309  text.append(button->text().split('\n').value(0).mid(0, 1).toUpper());
310  else if(button->text().contains('\n'))
311  text.append(button->text().split('\n').value(1));
312  else
313  text.append(button->text());
314 
315  m_ui.passphrase->setText(text);
316  }
317 
318  void slotShow(bool state)
319  {
320  if(state)
321  m_ui.passphrase->setEchoMode(QLineEdit::Normal);
322  else
323  m_ui.passphrase->setEchoMode(QLineEdit::Password);
324  }
325 
326  public slots:
327  void slotShift(void)
328  {
329  foreach(QToolButton *button, findChildren<QToolButton *> ())
330  if(button != m_ui.back && button != m_ui.shift)
331  {
332  if(m_ui.shift->isChecked())
333  button->setText(button->text().toUpper());
334  else
335  button->setText(button->text().toLower());
336  }
337  }
338 };
339 
340 #if QT_VERSION >= 0x050600 && defined(SPOTON_WEBENGINE_ENABLED)
341 class spoton_webengine_url_request_interceptor:
342  public QWebEngineUrlRequestInterceptor
343 {
344  Q_OBJECT
345 
346  public:
347  spoton_webengine_url_request_interceptor(QObject *parent):
348  QWebEngineUrlRequestInterceptor(parent)
349  {
350  }
351 
352  ~spoton_webengine_url_request_interceptor()
353  {
354  }
355 
356  void interceptRequest(QWebEngineUrlRequestInfo &info)
357  {
358  info.block(true);
359  }
360 };
361 #endif
362 
363 class spoton_lineedit: public QLineEdit
364 {
365  Q_OBJECT
366 
367  public:
368  spoton_lineedit(QWidget *parent):QLineEdit(parent)
369  {
370  m_dialog = new spoton_virtual_keyboard(this);
371  }
372 
373  ~spoton_lineedit()
374  {
375  }
376 
377  private:
378  void mouseDoubleClickEvent(QMouseEvent *event)
379  {
380  if(event)
381  if(event->type() == QEvent::MouseButtonDblClick)
382  {
383  m_dialog->m_ui.shift->setChecked(false);
384  m_dialog->m_ui.show->setChecked(false);
385  m_dialog->slotShift();
386  m_dialog->m_ui.passphrase->setFocus();
387 
388  if(m_dialog->exec() == QDialog::Accepted)
389  setText(m_dialog->m_ui.passphrase->text());
390 
391  m_dialog->m_ui.passphrase->clear();
392  }
393 
394  QLineEdit::mouseDoubleClickEvent(event);
395  }
396 
397  private:
398  spoton_virtual_keyboard *m_dialog;
399 };
400 
401 #include "Common/spot-on-common.h"
402 #include "Common/spot-on-crypt.h"
403 #include "Common/spot-on-external-address.h"
404 #include "Common/spot-on-misc.h"
405 #include "Common/spot-on-send.h"
406 #include "spot-on-chatwindow.h"
407 #include "spot-on-encryptfile.h"
408 #include "spot-on-logviewer.h"
409 #include "spot-on-rosetta.h"
410 #include "spot-on-smpwindow.h"
411 #include "ui_spot-on-controlcenter.h"
412 #include "ui_spot-on-notificationswindow.h"
413 #include "ui_spot-on-options.h"
414 #include "ui_spot-on-poptastic-retrophone-settings.h"
415 #include "ui_spot-on-statisticswindow.h"
416 #include "ui_spot-on-statusbar.h"
417 #include "ui_spot-on-wizard.h"
418 
419 class QProgressDialog;
422 class spoton_rss;
423 class spoton_smp;
425 
427 {
428  public:
429  QByteArray public_key;
430  QByteArray public_key_hash;
431  QString key_type;
432 };
433 
434 class spoton_integer_table_widget_item: public QTableWidgetItem
435 {
436  public:
437  spoton_integer_table_widget_item(const QString &text):QTableWidgetItem(text)
438  {
439  }
440 
441  bool operator<(const QTableWidgetItem &other) const
442  {
443  /*
444  ** Ignore toLongLong() errors.
445  */
446 
447  return text().toLongLong() < other.text().toLongLong();
448  }
449 };
450 
451 class spoton: public QMainWindow
452 {
453  Q_OBJECT
454 
455  public:
456  spoton(void);
457  ~spoton();
458  QHash<QString, QPair<QQueue<QString>, QQueue<QByteArray> > > m_chatQueues;
459  QHash<QString, QVariant> m_settings;
460  QHash<QString, quint64> m_chatSequenceNumbers;
461  QHash<QString, spoton_crypt *> crypts(void) const;
462  QMap<QString, QByteArray> SMPWindowStreams(const QStringList &keyTypes) const;
463  QList<QByteArray> retrieveForwardSecrecyInformation
464  (const QString &oid, bool *ok) const;
465  QSqlDatabase urlDatabase(void) const;
466 
467  QSslSocket *kernelSocket(void)
468  {
469  return &m_kernelSocket;
470  }
471 
472  QStandardItemModel *starbeamReceivedModel(void) const;
473  Ui_spoton_mainwindow ui(void) const;
474  spoton_crypt *urlCommonCrypt(void) const;
475  static QHash<QString, QStringList> s_publicKeySizes;
476  static QList<QTableWidgetItem *> findItems(QTableWidget *table,
477  const QString &text,
478  const int column);
479  static QPointer<spoton> instance(void);
480  static QString mapIconToEmoticon(const QString &content);
481  static void prepareDatabasesFromUI(void);
482  void addMessageToReplayQueue(const QString &message1,
483  const QByteArray &message2,
484  const QString &publicKeyHash);
485 
486  private:
487  static const int APPLY_GOLDBUG_TO_LETTER_ERROR_ATTACHMENTS = 1;
488  static const int APPLY_GOLDBUG_TO_LETTER_ERROR_DATABASE = 2;
489  static const int APPLY_GOLDBUG_TO_LETTER_ERROR_GENERAL = 3;
490  static const int APPLY_GOLDBUG_TO_LETTER_ERROR_MEMORY = 4;
491  QAtomicInt m_pqUrlFaultyCounter;
492  QAtomicInt m_starbeamDigestInterrupt;
493  QByteArray m_kernelSocketData;
494  QDateTime m_buzzFavoritesLastModificationTime;
495  QDateTime m_listenersLastModificationTime;
496  QDateTime m_magnetsLastModificationTime;
497  QDateTime m_neighborsLastModificationTime;
498  QDateTime m_participantsLastModificationTime;
499  QDateTime m_starsLastModificationTime;
500  QDialog *m_poptasticRetroPhoneDialog;
501  QElapsedTimer m_urlQueryElapsedTimer;
502  QFuture<QList<QPair<QString, QVariant> > > m_statisticsFuture;
503  QFuture<void> m_generalFuture;
504  QFuture<void> m_neighborsFuture;
505  QFuture<void> m_participantsFuture;
506  QFuture<void> m_pqUrlDatabaseFuture;
507  QFutureWatcher<QList<QPair<QString, QVariant> > > m_statisticsFutureWatcher;
508  QHash<QByteArray, QPointer<spoton_buzzpage> > m_buzzPages;
509  QHash<QByteArray, QString> m_neighborToOidMap;
510  QHash<QByteArray, quint64> m_receivedChatSequenceNumbers;
511  QHash<QByteArray, spoton_forward_secrecy> m_forwardSecrecyRequests;
512  QHash<QString, QByteArray> m_buzzIds;
513  QHash<QString, QPointer<spoton_chatwindow> > m_chatWindows;
514  QHash<QString, QString> m_keysShared;
515  QHash<QString, bool> m_wizardHash;
516  QHash<QString, spoton_crypt *> m_crypts;
517  QHash<QString, spoton_smp *> m_smps; /*
518  ** The objects contained within
519  ** m_smps are destroyed whenever
520  ** participants are removed or
521  ** whenever the UI process terminates.
522  ** Unlike m_chatWindows, m_smps
523  ** purging is less rigid.
524  */
525  QList<QFuture<void> > m_starbeamDigestFutures;
526  QMainWindow *m_addParticipantWindow;
527  QMainWindow *m_notificationsWindow;
528  QMainWindow *m_optionsWindow;
529  QMainWindow *m_statisticsWindow;
530  QMap<int, QHash<QString, QVariant> > m_tabWidgetsProperties;
531  QMap<int, QWidget *> m_tabWidgets; /*
532  ** QTabWidget does not provide
533  ** a method for hiding individual pages.
534  */
535  QSet<QString> m_urlPrefixes;
536  QSqlDatabase m_urlDatabase;
537  QSslSocket m_kernelSocket;
538  QStandardItemModel *m_starbeamReceivedModel;
539  QStandardItemModel *m_statisticsModel;
540  QString m_urlQuery;
541  QTimer m_buzzStatusTimer;
542  QTimer m_chatInactivityTimer;
543  QTimer m_emailRetrievalTimer;
544  QTimer m_externalAddressDiscovererTimer;
545  QTimer m_generalTimer;
546  QTimer m_kernelUpdateTimer;
547  QTimer m_listenersUpdateTimer;
548  QTimer m_neighborsUpdateTimer;
549  QTimer m_participantsUpdateTimer;
550  QTimer m_starbeamUpdateTimer;
551  QTimer m_tableTimer;
552  QTimer m_updateChatWindowsTimer;
553  QWidget *m_sbWidget;
554  Ui_spoton_mainwindow m_ui;
555  Ui_spoton_notifications_window m_notificationsUi;
556  Ui_spoton_options m_optionsUi;
557  Ui_spoton_poptasticretrophonesettings m_poptasticRetroPhoneSettingsUi;
558  Ui_spoton_statistics_window m_statisticsUi;
559  Ui_spoton_statusbar m_sb;
560  Ui_spoton_wizard *m_wizardUi;
561  bool m_locked;
562  bool m_quit;
563  quint64 m_urlCurrentPage;
564  quint64 m_urlLimit;
565  quint64 m_urlOffset;
566  quint64 m_urlPages;
567  spoton_crypt *m_urlCommonCrypt;
568  spoton_documentation *m_documentation;
569  spoton_documentation *m_releaseNotes;
570  spoton_echo_key_share *m_echoKeyShare;
571  spoton_encryptfile m_encryptFile;
572  spoton_external_address m_externalAddress;
573  spoton_logviewer m_logViewer;
574  spoton_rosetta m_rosetta;
575  spoton_rss *m_rss;
576  spoton_smpwindow m_smpWindow;
577  spoton_starbeamanalyzer *m_starbeamAnalyzer;
578  QByteArray copiedPublicKeyPairToMagnet(const QByteArray &data) const;
579  QByteArray copyMyChatPublicKey(void) const;
580  QByteArray copyMyEmailPublicKey(void) const;
581  QByteArray copyMyOpenLibraryPublicKey(void) const;
582  QByteArray copyMyPoptasticPublicKey(void) const;
583  QByteArray copyMyRosettaPublicKey(void) const;
584  QByteArray copyMyUrlPublicKey(void) const;
585  QByteArray poptasticName(void) const;
586  QByteArray poptasticNameEmail(void) const;
587  QList<QPair<QString, QVariant> > gatherStatistics(void) const;
588  QPixmap pixmapForCountry(const QString &country) const;
589  QString currentTabName(void) const;
590  QString listenerTransport(void) const;
591  QString neighborTransport(void) const;
592  QString participantKeyType(QTableWidget *table) const;
593  QString saveCommonUrlCredentials
594  (const QPair<QByteArray, QByteArray> &keys,
595  const QString &cipherType, const QString &hashType,
596  spoton_crypt *crypt) const;
597  QString savePoptasticAccount(void);
598  QStringList parseAEMagnet(const QString &magnet) const;
599  bool addFriendsKey(const QByteArray &key, const QString &type,
600  QWidget *parent);
601  bool deleteAllUrls(void);
602  bool isKernelActive(void) const;
603  bool listenerSupportsSslTls(void) const;
604  bool neighborSupportsSslTls(void) const;
605  bool promptBeforeExit(void);
606  bool saveGemini(const QPair<QByteArray, QByteArray> &gemini,
607  const QString &oid);
608  bool updateMailStatus(const QString &oid, const QString &status);
609  bool verifyInitializationPassphrase(QWidget *parent);
610  int applyGoldBugToLetter(const QByteArray &goldbug,
611  const int row);
612  int tabIndexFromName(const QString &name) const;
613  void applyGoldBugToAttachments(const QString &folderOid,
614  const QSqlDatabase &db,
615  int *count,
616  spoton_crypt *crypt,
617  bool *ok);
618  void askKernelToReadStarBeamKeys(void);
619  void authenticate(spoton_crypt *crypt, const QString &oid,
620  const QString &message = "");
621  void authenticationRequested(const QByteArray &data);
622  void cancelUrlQuery(void);
623  void changeEchoMode(const QString &mode, QTableWidget *tableWidget);
624  void cleanup(void);
625  void closeEvent(QCloseEvent *event);
626  void computeFileDigest(const QByteArray &expectedFileHash,
627  const QString &fileName,
628  const QString &oid,
629  spoton_crypt *crypt);
630  void demagnetize(void);
631  void derivativeUpdates(void);
632  void discoverUrls(void);
633  void displayUrlImportResults(const QDateTime &then,
634  const quint64 imported,
635  const quint64 not_imported,
636  const quint64 declined);
637  void forwardSecrecyRequested(const QList<QByteArray> &list);
638  void generalConcurrentMethod(const QHash<QString, QVariant> &settings);
639  void generateHalfGeminis(void);
640  void highlightPaths(void);
641  void importNeighbors(const QString &filePath);
642  void initializeKernelSocket(void);
643  void initializeSMP(const QString &hash);
644  void initializeUrlDistillers(void);
645  void inspectPQUrlDatabase(const QByteArray &password);
646  void joinBuzzChannel(const QUrl &url);
647  void joinDefaultBuzzChannel(void);
648  void magnetize(void);
649  void notify(const QString &text);
650  void playSound(const QString &name);
651  void popForwardSecrecyRequest(const QByteArray &publicKeyHash);
652  void populateAETokens(void);
653  void populateAccounts(const QString &listenerOid);
654  void populateListenerIps(const QString &listenerOid);
655  void populateMOTD(const QString &listenerOid);
656  void populateMail(void);
657  void populateNovas(void);
658  void populatePoptasticWidgets(const QHash<QString, QVariant> &hash);
659  void populateStatistics(const QList<QPair<QString, QVariant> > &list);
660  void populateUrlDistillers();
661  void prepareAndShowInstallationWizard(void);
662  void prepareContextMenuMirrors(void);
663  void prepareListenerIPCombo(void);
664  void prepareSMP(const QString &hash);
665  void prepareTabIcons(void);
666  void prepareTimeWidgets(void);
667  void prepareUrlContainers(void);
668  void prepareUrlLabels(void);
669  void prepareVisiblePages(void);
670  void refreshInstitutions(void);
671  void removeFavorite(const bool removeAll);
672  void retrieveNeighbors(void);
673  void retrieveParticipants(spoton_crypt *crypt);
674  void saveDestination(const QString &path);
675  void saveGeoIPPath(const int version, const QString &path);
676  void saveKernelPath(const QString &path);
677  void saveSettings(void);
678  void saveUrlIniPath(const QString &path);
679  void sendBuzzKeysToKernel(void);
680  void sendKeysToKernel(void);
681  void sendMessage(bool *ok);
682  void sendSMPLinkToKernel(const QList<QByteArray> &list,
683  const QString &keyType,
684  const QString &oid);
685  void setSBField(const QString &oid, const QVariant &value,
686  const QString &field);
687  void sharePublicKeyWithParticipant(const QString &keyType);
688  void showError(const QString &error);
689  void showUrls(const QString &link, const QString &querystr);
690  void updatePoptasticNameSettingsFromWidgets(spoton_crypt *crypt);
691  void updatePublicKeysLabel(void);
692  void verifySMPSecret(const QString &hash, const QString &keyType,
693  const QString &oid);
694 
695  private slots:
696  void slotAbout(void);
697  void slotAboutToShowChatSecretsMenu(void);
698  void slotAboutToShowEmailSecretsMenu(void);
699  void slotAcceptBuzzMagnets(bool state);
700  void slotAcceptChatKeys(bool state);
701  void slotAcceptEmailKeys(bool state);
702  void slotAcceptGeminis(bool state);
703  void slotAcceptPublicizedListeners(void);
704  void slotAcceptUrlKeys(bool state);
705  void slotActivateKernel(void);
706  void slotActiveUrlDistribution(bool state);
707  void slotAddAEToken(void);
708  void slotAddAcceptedIP(void);
709  void slotAddAccount(void);
710  void slotAddAttachment(void);
711  void slotAddBootstrapper(void);
712  void slotAddDistiller(void);
713  void slotAddEtpMagnet(const QString &text = "",
714  const bool displayError = true);
715  void slotAddFriendsKey(void);
716  void slotAddInstitution(const QString &text = "");
717  void slotAddInstitutionCheckBoxToggled(bool state);
718  void slotAddListener(void);
719  void slotAddMagnet(void);
720  void slotAddNeighbor(void);
721  void slotAddReceiveNova(void);
722  void slotAfterFirstShow(void);
723  void slotAllowFSRequest(bool state);
724  void slotAssignNewIPToNeighbor(void);
725  void slotAuthenticate(void);
726  void slotAuthenticationRequestButtonClicked(void);
727  void slotAutoAddSharedSBMagnets(bool state);
728  void slotAutoRetrieveEmail(bool state);
729  void slotBlockNeighbor(void);
730  void slotBluetoothSecurityChanged(int index);
731  void slotBuzzActionsActivated(int index);
732  void slotBuzzChanged(void);
733  void slotBuzzInvite(void);
734  void slotBuzzPageDestroyed(QObject *object);
735  void slotBuzzTools(int index);
736  void slotCallParticipant(void);
737  void slotCallParticipantViaForwardSecrecy(void);
738  void slotChangeTabPosition(int index);
739  void slotChatInactivityTimeout(void);
740  void slotChatPopup(void);
741  void slotChatSecretsActionSelected(void);
742  void slotChatSendMethodChanged(int index);
743  void slotChatTimestamps(bool state);
744  void slotChatWindowDestroyed(void);
745  void slotChatWindowMessageSent(void);
746  void slotClearClipboardBuffer(void);
747  void slotClearOutgoingMessage(void);
748  void slotCloseBuzzTab(int index);
749  void slotCloseTab(void);
750  void slotCommonBuzzChannelsActivated(int index);
751  void slotComputeFileHash(void);
752  void slotConfigurePoptastic(void);
753  void slotConnectAllNeighbors(void);
754  void slotConnectNeighbor(void);
755  void slotCopyAEMagnet(void);
756  void slotCopyAllMyPublicKeys(void);
757  void slotCopyEmailFriendshipBundle(void);
758  void slotCopyEmailKeys(void);
759  void slotCopyEtpMagnet(void);
760  void slotCopyFileHash(void);
761  void slotCopyFriendshipBundle(void);
762  void slotCopyInstitution(void);
763  void slotCopyMyChatPublicKey(void);
764  void slotCopyMyEmailPublicKey(void);
765  void slotCopyMyOpenLibraryPublicKey(void);
766  void slotCopyMyPoptasticPublicKey(void);
767  void slotCopyMyRosettaPublicKey(void);
768  void slotCopyMyURLPublicKey(void);
769  void slotCopyOrPaste(void);
770  void slotCopyPrivateApplicationMagnet(void);
771  void slotCopyStyleSheet(void);
772  void slotCopyTransmittedMagnet(void);
773  void slotCopyUrlFriendshipBundle(void);
774  void slotCopyUrlKeys(void);
775  void slotCorrectUrlDatabases(void);
776  void slotCostChanged(int value);
777  void slotDaysChanged(int value);
778  void slotDeactivateKernel(void);
779  void slotDeleteAEToken(void);
780  void slotDeleteAcceptedIP(void);
781  void slotDeleteAccount(void);
782  void slotDeleteAllBlockedNeighbors(void);
783  void slotDeleteAllListeners(void);
784  void slotDeleteAllNeighbors(void);
785  void slotDeleteAllReceived(void);
786  void slotDeleteAllTransmitted(void);
787  void slotDeleteAllUrls(void);
788  void slotDeleteAllUuids(void);
789  void slotDeleteEtpAllMagnets(void);
790  void slotDeleteEtpMagnet(void);
791  void slotDeleteInstitution(void);
792  void slotDeleteKey(void);
793  void slotDeleteListener(void);
794  void slotDeleteMail(void);
795  void slotDeleteNeighbor(void);
796  void slotDeleteNova(void);
797  void slotDeletePoptasticAccount(void);
798  void slotDeleteReceived(void);
799  void slotDeleteTransmitted(void);
800  void slotDeleteUrlDistillers(void);
801  void slotDemagnetizeMissingLinks(void);
802  void slotDeriveGeminiPairViaSMP(const QString &publicKeyHash,
803  const QString &oid);
804  void slotDeriveGeminiPairViaSMP(void);
805  void slotDetachListenerNeighbors(void);
806  void slotDisableSynchronousUrlImport(bool state);
807  void slotDisconnectAllNeighbors(void);
808  void slotDisconnectListenerNeighbors(void);
809  void slotDisconnectNeighbor(void);
810  void slotDiscover(void);
811  void slotDiscoverExternalAddress(void);
812  void slotDiscoverMissingLinks(void);
813  void slotDisplayLocalSearchResults(void);
814  void slotDisplayPopups(bool state);
815  void slotDoSearch(void);
816  void slotDropUrlTables(void);
817  void slotDuplicateTransmittedMagnet(void);
818  void slotEmailFsGb(int index);
819  void slotEmailSecretsActionSelected(void);
820  void slotEmptyTrash(void);
821  void slotEnableChatEmoticons(bool state);
822  void slotEnableRetrieveMail(void);
823  void slotEnabledPostOffice(bool state);
824  void slotEncryptionKeyTypeChanged(int index);
825  void slotEstablishForwardSecrecy(void);
826  void slotExportListeners(void);
827  void slotExportPublicKeys(void);
828  void slotExternalIp(int index);
829  void slotFavoritesActivated(int index);
830  void slotFetchMoreAlgo(void);
831  void slotFetchMoreButton(void);
832  void slotForceKernelRegistration(bool state);
833  void slotForwardSecrecyEncryptionKeyChanged(int index);
834  void slotGatherStatistics(void);
835  void slotGatherUrlStatistics(void);
836  void slotGeminiChanged(QTableWidgetItem *item);
837  void slotGeneralTimerTimeout(void);
838  void slotGenerateEtpKeys(int index);
839  void slotGenerateGeminiInChat(void);
840  void slotGenerateNova(void);
841  void slotGenerateOneYearListenerCertificate(void);
842  void slotGoldBugDialogActionSelected(void);
843  void slotHideOfflineParticipants(bool state);
844  void slotImpersonate(bool state);
845  void slotImportNeighbors(void);
846  void slotImportPublicKeys(void);
847  void slotImportUrls(void);
848  void slotInitializeSMP(const QString &hash);
849  void slotInitializeSMP(void);
850  void slotJoinBuzzChannel(void);
851  void slotKeepCopy(bool state);
852  void slotKeepOnlyUserDefinedNeighbors(bool state);
853  void slotKernelCipherTypeChanged(int index);
854  void slotKernelHashTypeChanged(int index);
855  void slotKernelKeySizeChanged(const QString &text);
856  void slotKernelLogEvents(bool state);
857  void slotKernelSocketError(QAbstractSocket::SocketError error);
858  void slotKernelSocketSslErrors(const QList<QSslError> &errors);
859  void slotKernelSocketState(void);
860  void slotKernelStatus(void);
861  void slotKernelUrlBatchSizeChanged(int value);
862  void slotKeysIndexChanged(const QString &text);
863  void slotLaneWidthChanged(int index);
864  void slotLaunchKernelAfterAuthentication(bool state);
865  void slotLimitConnections(int value);
866  void slotLinkClicked(const QUrl &url);
867  void slotListenerChanged(QTableWidgetItem *item);
868  void slotListenerFullEcho(void);
869  void slotListenerHalfEcho(void);
870  void slotListenerIPComboChanged(int index);
871  void slotListenerMaximumChanged(int value);
872  void slotListenerSelected(void);
873  void slotListenerSourceOfRandomnessChanged(int value);
874  void slotLock(void);
875  void slotMagnetRadioToggled(bool state);
876  void slotMailContextMenu(const QPoint &point);
877  void slotMailRetrievalIntervalChanged(int value);
878  void slotMailSelected(QTableWidgetItem *item);
879  void slotMailSelected(void);
880  void slotMailTabChanged(int index);
881  void slotMaxMosaicSize(int value);
882  void slotMaximumClientsChanged(int index);
883  void slotMaximumEmailFileSizeChanged(int value);
884  void slotMaximumUrlKeywordsChanged(int value);
885 #if QT_VERSION >= 0x050000
886  void slotMediaError(QMediaPlayer::Error error);
887  void slotMediaStatusChanged(QMediaPlayer::MediaStatus status);
888 #endif
889  void slotMessagesAnchorClicked(const QUrl &url);
890  void slotModeChanged(QSslSocket::SslMode mode);
891  void slotMonitorEvents(bool state);
892  void slotNeighborChanged(QTableWidgetItem *item);
893  void slotNeighborFullEcho(void);
894  void slotNeighborHalfEcho(void);
895  void slotNeighborMaximumChanged(int value);
896  void slotNeighborSilenceTimeChanged(int value);
897  void slotNeighborWaitForBytesWrittenChanged(int value);
898  void slotNewEmailWindow(void);
899  void slotNewGlobalName(void);
900  void slotNewKeys(bool state);
901  void slotNotificationsEnabled(bool state);
902  void slotOntopChatDialogs(bool state);
903  void slotOpenChatUrlChecked(bool state);
904  void slotPQUrlDatabaseFaulty(void);
905  void slotPageClicked(const QString &link);
906  void slotParticipantDoubleClicked(QTableWidgetItem *item);
907  void slotPassphraseAuthenticateRadioToggled(bool state);
908  void slotPassphraseChanged(const QString &text);
909  void slotPassphraseRadioToggled(bool state);
910  void slotPlaySounds(bool state);
911  void slotPoptasticAccountChanged(const QString &text);
912  void slotPoptasticSettingsReset(bool state);
913  void slotPoptasticSettingsReset(void);
914  void slotPopulateBuzzFavorites(void);
915  void slotPopulateEtpMagnets(void);
916  void slotPopulateListeners(void);
917  void slotPopulateNeighbors(QSqlDatabase *db,
918  QSqlQuery *query,
919  const QString &connectionName,
920  const int &size);
921  void slotPopulateNeighbors(void);
922  void slotPopulateParticipants(QSqlDatabase *db,
923  QSqlQuery *query,
924  const QString &connectionName);
925  void slotPopulateParticipants(void);
926  void slotPopulateStars(void);
927  void slotPostgreSQLConnect(void);
928  void slotPostgreSQLDisconnect(int index);
929  void slotPostgreSQLKernelUrlDistributionTimeout(int value);
930  void slotPrepareAndShowInstallationWizard(void);
931  void slotPrepareContextMenuMirrors(void);
932  void slotPrepareSMP(const QString &hash);
933  void slotPrepareSMP(void);
934  void slotPrepareUrlDatabases(void);
935  void slotPreviewStyleSheet(void);
936  void slotProtocolRadioToggled(bool state);
937  void slotProxyChecked(bool state);
938  void slotProxyTypeChanged(int index);
939  void slotPublicizeAllListenersPlaintext(void);
940  void slotPublicizeListenerPlaintext(void);
941  void slotPublishPeriodicallyToggled(bool sate);
942  void slotPublishedKeySizeChanged(const QString &text);
943  void slotPurgeEphemeralKeyPair(void);
944  void slotPurgeEphemeralKeys(void);
945  void slotQuit(void);
946  void slotReceivedKernelMessage(void);
947  void slotReceiversChanged(QTableWidgetItem *item);
948  void slotReceiversClicked(bool state);
949  void slotRefreshMail(void);
950  void slotRefreshPostOffice(void);
951  void slotRefreshUrlDistillers(void);
952  void slotRegenerateKey(void);
953  void slotReloadEmailNames(void);
954  void slotRemoveAttachment(const QUrl &url);
955  void slotRemoveEmailParticipants(void);
956  void slotRemoveOtmOnExit(bool state);
957  void slotRemoveParticipants(void);
958  void slotRemoveUrlParticipants(void);
959  void slotRenameParticipant(void);
960  void slotReplayMessages(void);
961  void slotReply(void);
962  void slotResendMail(void);
963  void slotResetAETokenInformation(void);
964  void slotResetAccountInformation(void);
965  void slotResetAll(void);
966  void slotResetAllStyleSheets(void);
967  void slotResetCertificate(void);
968  void slotResetForwardSecrecyInformation(void);
969  void slotResetPrivateApplicationInformation(void);
970  void slotResetStyleSheet(void);
971  void slotRespondToForwardSecrecy(void);
972  void slotRetrieveMail(void);
973  void slotRewindFile(void);
974  void slotSaveAlternatingColors(bool state);
975  void slotSaveAttachment(void);
976  void slotSaveBuzzAutoJoin(bool state);
977  void slotSaveBuzzName(void);
978  void slotSaveCommonUrlCredentials(void);
979  void slotSaveCongestionAlgorithm(const QString &text);
980  void slotSaveCustomStatus(void);
981  void slotSaveDestination(void);
982  void slotSaveEmailName(void);
983  void slotSaveGeoIPPath(void);
984  void slotSaveKernelPath(void);
985  void slotSaveMOTD(void);
986  void slotSaveNodeName(void);
987  void slotSaveOpenLinks(bool state);
988  void slotSavePoptasticAccount(void);
989  void slotSaveRefreshEmail(bool state);
990  void slotSaveSecondaryStorage(bool state);
991  void slotSaveSharePrivateKeys(bool state);
992  void slotSaveSslControlString(void);
993  void slotSaveStarBeamAutoVerify(bool state);
994  void slotSaveUrlCredentials(void);
995  void slotSaveUrlDistribution(int index);
996  void slotSaveUrlName(void);
997  void slotScramble(bool state);
998  void slotSearchResultsPerPage(int value);
999  void slotSecureMemoryPoolChanged(int value);
1000  void slotSelectCAPath(void);
1001  void slotSelectDestination(void);
1002  void slotSelectGeoIPPath(void);
1003  void slotSelectKernelPath(void);
1004  void slotSelectTransmitFile(void);
1005  void slotSelectUrlIniPath(void);
1006  void slotSendMail(void);
1007  void slotSendMessage(void);
1008  void slotSeparateBuzzPage(void);
1009  void slotSetAETokenInformation(void);
1010  void slotSetIconSize(int index);
1011  void slotSetIcons(int index);
1012  void slotSetListenerSSLControlString(void);
1013  void slotSetNeighborPriority(void);
1014  void slotSetNeighborSSLControlString(void);
1015  void slotSetPassphrase(void);
1016  void slotSetPrivateApplicationInformation(void);
1017  void slotSetSBPulseSize(void);
1018  void slotSetSBReadInterval(void);
1019  void slotSetSocketOptions(void);
1020  void slotSetStyleSheet(void);
1021  void slotSetUrlIniPath(void);
1022  void slotSetWidgetStyleSheet(const QPoint &point);
1023  void slotShareBuzzMagnet(void);
1024  void slotShareChatPublicKey(void);
1025  void slotShareChatPublicKeyWithParticipant(void);
1026  void slotShareEmailPublicKey(void);
1027  void slotShareEmailPublicKeyWithParticipant(void);
1028  void slotShareKeysWithKernel(const QString &link);
1029  void slotShareOpenLibraryPublicKey(void);
1030  void slotSharePoptasticPublicKey(void);
1031  void slotShareStarBeam(void);
1032  void slotShareURLPublicKey(void);
1033  void slotShareUrlPublicKeyWithParticipant(void);
1034  void slotShowAddParticipant(void);
1035  void slotShowBuzzDetails(bool state);
1036  void slotShowBuzzTabContextMenu(const QPoint &point);
1037  void slotShowContextMenu(const QPoint &point);
1038  void slotShowDocumentation(void);
1039  void slotShowEncryptFile(void);
1040  void slotShowErrorMessage(void);
1041  void slotShowEtpMagnetsMenu(const QPoint &point);
1042  void slotShowMainTabContextMenu(const QPoint &point);
1043  void slotShowMinimalDisplay(bool state);
1044  void slotShowNeighborStatistics(void);
1045  void slotShowNotificationsWindow(void);
1046  void slotShowOptions(void);
1047  void slotShowPage(bool state);
1048  void slotShowReleaseNotes(void);
1049  void slotShowRss(void);
1050  void slotShowSMPWindow(void);
1051  void slotShowStarBeamAnalyzer(void);
1052  void slotShowStatistics(void);
1053  void slotShowStatisticsWindow(void);
1054  void slotShowUrlSettings(bool state);
1055  void slotSignatureCheckBoxToggled(bool state);
1056  void slotSignatureKeyTypeChanged(int index);
1057  void slotStarBeamFragmented(bool state);
1058  void slotStarOTMCheckChange(bool state);
1059  void slotStatisticsGathered(void);
1060  void slotStatusButtonClicked(void);
1061  void slotStatusChanged(int index);
1062  void slotSuperEcho(int index);
1063  void slotTabChanged(int index);
1064  void slotTerminateKernelOnUIExit(bool state);
1065  void slotTestPoptasticPop3Settings(void);
1066  void slotTestPoptasticSmtpSettings(void);
1067  void slotTestSslControlString(void);
1068  void slotTimeSliderDefaults(void);
1069  void slotTimeSliderValueChanged(int value);
1070  void slotTransmit(void);
1071  void slotTransmittedPaused(bool state);
1072  void slotTransmittedSelected(void);
1073  void slotTransportChanged(int index);
1074  void slotUnblockNeighbor(void);
1075  void slotUnifyBuzz(void);
1076  void slotUpdateChatWindows(void);
1077  void slotUpdateSpinBoxChanged(double value);
1078  void slotUrlLinkClicked(const QUrl &u);
1079  void slotUrlPolarizerTypeChange(int index);
1080  void slotVacuumDatabases(void);
1081  void slotValidatePassphrase(void);
1082  void slotVerify(void);
1083  void slotVerifySMPSecret(const QString &hash, const QString &keyType,
1084  const QString &oid);
1085  void slotVerifySMPSecret(void);
1086  void slotViewEchoKeyShare(void);
1087  void slotViewLog(void);
1088  void slotViewRosetta(void);
1089  void slotWizardButtonClicked(void);
1090  void slotWizardCheckClicked(void);
1091 
1092  signals:
1093  void buzzNameChanged(const QByteArray &name);
1094  void iconsChanged(void);
1095  void neighborsQueryReady(QSqlDatabase *db,
1096  QSqlQuery *query,
1097  const QString &connectionName,
1098  const int &size);
1099  void participantsQueryReady(QSqlDatabase *db,
1100  QSqlQuery *query,
1101  const QString &connectionName);
1102  void pqUrlDatabaseFaulty(void);
1103  void smpMessageReceivedFromKernel(const QByteArrayList &list);
1104  void statusChanged(const QIcon &icon,
1105  const QString &name,
1106  const QString &id,
1107  const QString &toolTip);
1108  void updateEmailWindows(void);
1109 };
1110 
1111 #endif
Definition: spot-on-documentation.h:38
Definition: spot-on.h:101
Definition: spot-on-smpwindow.h:60
Definition: spot-on.h:434
Definition: spot-on-smp.h:40
Definition: spot-on-rss.h:40
Definition: spot-on.h:363
Definition: spot-on-crypt.h:65
Definition: spot-on-rosetta.h:38
Definition: spot-on-echo-key-share.h:40
Definition: spot-on-encryptfile.h:37
Definition: spot-on-logviewer.h:39
Definition: spot-on-starbeamanalyzer.h:44
Definition: spot-on-external-address.h:35
Definition: spot-on.h:426
Definition: spot-on.h:451